<?php
$query = mysql_query("SELECT * FROM whoisonline WHERE ip='".$_SERVER['REMOTE_ADDR']."'");
$userID;
if(mysql_num_rows($query)) {
	while($row = mysql_fetch_array($query))
	{
		$userID = $row['userID'];
		break;
	}
} else {
	echo "false : ".mysql_num_rows($query).$_SERVER['REMOTE_ADDR'];
	exit();
}
?>